# -*- coding: utf-8 -*-
# @project: huawang-api20230914
# @file： tmp_lg_06.py
# @Time：2023/9/26 09:53
# @Author：liaogan


import random
import datetime


def generate_random_id():
    # 随机生成地区编码
    area_code = str(random.randint(100000, 999999))

    # 随机生成出生日期
    birth_date = datetime.datetime.now().strftime("%Y%m%d")

    # 随机生成顺序号
    sequence_number = str(random.randint(100, 999))

    # 计算校验码
    id_number = area_code + birth_date + sequence_number

    return id_number






print(generate_random_id())